package com.b.service;

import java.util.List;
import java.util.Map;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;

import com.b.domain.Order;

public interface OrderService{


    Boolean deleteByPrimaryKey(String id);

    int insert(Order record);

    int insertSelective(Order record);

    Order selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(Order record);

    int updateByPrimaryKey(Order record);

    List<Order> getAll();

    Page<Order> list(Integer userId, Integer productId, String status, PageRequest pageRequest);

    Boolean createSeckillOrder(Integer userId, Integer productId, Integer quantity);

    Boolean createOrder(Integer userId, Integer productId, Integer quantity);

    Boolean updateStatus(String id, String status);

    /**
     * 获取最近5天每日交易金额
     */
    List<Map<String, Object>> getRecent5DaysAmount();
}
